<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>03demo</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <h1>{{num}}</h1>
    <input type="text" v-model="num">
    <button @click.stop="stopClick">增加</button>
    <button v-on:click="num--">减少</button>
    <h2>{{msg}}</h2>
</div>
<script type = "text/javascript">
    var app=new Vue({
         el:"#app",
        data:{
            num:1

        },
        methods:{
          stopClick(){
              console.log("stop click")
          }
        },
        created(){
             this.msg="Goodbye Vue"
        }
    })
</script>
</body>
</html>